<<<<<<< HEAD

=======
"""
@file:   10-19弹珠游戏.py.py
@author: hxli
@data: 2020/10/19
"""
##第一题####
# a = float(5)
# b = float(7)
# print(f"1.0+a/b的值是:{1.0+a/b}")
# ####第二题###
# x = float(input("请输入x的值:"))
# y = float(input("请输入y的值:"))
# z = float(input("请输入z的值:"))
# if (x < z and y > z) or (y < z and x > z):
#     print("x或y中有一个小于z")
# else:
#     print("x与y都小于z或者都大于z")
###第三题####
import random
light = ["0","0","0","0","0","0","0","0","0","0","0","0"]

#要进行多少次替换
light_num = random.randrange(0,12)
for i in range(light_num) :
    power_light = random.randrange(0,11)
    light[power_light]=light[power_light].replace("0","1")

hoodle = random.randrange(0,11)
str = ''.join(light)
print("亮灯结果：",str)
if int(light[hoodle]) == 1 :
    print(f"你打中了第{hoodle+1}个灯")
else :
    print("很抱歉你没打中")
>>>>>>> 0a1ecc8f7d60595102cdaff0b8d027f265880af9

